Method and Apparatus for Block-based Significance Map and Significance Group Flag Context Selection

ABSTRACT

A method of significance group flag coding is disclosed. The method includes: receiving one or more significance group flags associated with a TU (transform unit), wherein the TU is divided into one or more sub-blocks; and coding said one or more significance group flags based on context set selection, wherein the context set selection is associated with significance map coding of the sub-block, and the context set selection depends on horizontal sub-block index, vertical sub-block index, or both the horizontal sub-block index and the vertical sub-block index.

CROSS REFERENCE TO RELATED APPLICATIONS

The present invention is a divisional of pending U.S. patent applicationSer. No. 14/368,264, filed on Jun. 23, 2014, which is a National Phaseof PCT Application No. PCT/CN2012/085034, filed on Nov. 22, 2012, whichclaims priority to U.S. Provisional Patent Application Ser. No.61/582,725, filed Jan. 3, 2012, entitled “Block-based Significance Mapand Significance Group Flag Context Selection Method”. The priorityapplications are hereby incorporated by reference in their entireties.

FIELD OF THE INVENTION

The present invention relates to video coding or video processing. Inparticular, the present invention relates to significance map coding andsignificance group flag coding.

BACKGROUND AND RELATED ARTS

The arithmetic coding is known as an efficient data compressing methodand is widely used in coding standards, such as JBIG, JPEG2000,H.264/AVC, and High-Efficiency Video Coding (HEVC). In H.264/AVC JVTTest Model (JM) and HEVC Test Model (HM), Context-Based Adaptive BinaryArithmetic Coding (CABAC) is adopted as the entropy coding tool forvarious syntax elements in the video coding system.

FIG. 1 illustrates an example of CABAC encoder 100 which includes threeparts: Binarization 110, Context Modeling 120, and Binary ArithmeticCoding (BAC) 130. In the binarization step, each syntax element isuniquely mapped into a binary string (also called bin or bins in thisdisclosure). In the context modeling step, a probability model isselected for each bin. The corresponding probability model may depend onpreviously encoded syntax elements, bin indexes, side information, orany combination of the above. After the binarization and the contextmodel assignment, a bin value along with its associated context model isprovided to the binary arithmetic coding engine, i.e., the BAC 130 blockin FIG. 1. The bin value can be coded in two coding modes depending onthe syntax element and bin indexes, where one is the regular codingmode, and the other is the bypass mode. The bins corresponding toregular coding mode are referred to as regular bins and the binscorresponding to bypass coding mode are referred to as bypass bins inthis disclosure. In the regular coding mode, the probability of the MostProbable Symbol (MPS) and the probability of the Least Probable Symbol(LPS) for BAC are derived from the associated context model. In thebypass coding mode, the probability of the MPS and the LPS are equal. InCABAC, the bypass mode is introduced to speed up the encoding process.

High-Efficiency Video Coding (HEVC) is a new international video codingstandard that is being developed by the Joint Collaborative Team onVideo Coding (JCT-VC). HEVC is based on the hybrid block-basedmotion-compensated DCT-like transform coding architecture. The basicunit for compression, termed Coding Unit (CU), is a 2N×2N square block,and each CU can be recursively split into four smaller CUs until apredefined minimum size is reached. Each CU contains one or severalvariable-block-sized Prediction Unit(s) (PUs) and Transform Unit(s)(TUs). For each PU, either intra-picture or inter-picture prediction isselected. Each TU is processed by a spatial block transformation and thetransform coefficients for the TU are then quantized. The smallest TUsize allowed for HEVC is 4×4.

In HEVC Test Model Version 5.0 (HM-5.0), the transform coefficients arecoded TU by TU. For each TU, syntax elements last_significant_coeff_xand last_significant_coeff_y are transmitted to indicate the lastnon-zero coefficient horizontal and vertical positions respectivelyaccording to a selected scanning order. A TU is divided into multiplesubsets for the TUs having size larger than 4×4. For an 8×8 TU, the 64coefficients are divided into 4 subsets according to the diagonalscanning order through the entire 8×8 TU as shown in FIG. 2. Thescanning through the transform coefficients will convert thetwo-dimensional data into a one-dimensional data. Each subset contains16 continuous coefficients of the diagonally scanned coefficients. ForTUs having size larger than 8×8 (e.g. 16×16, 32×32) and non-square TUs(e.g. 16×4, 4×16, 32×8, 8×32), the TUs are divided into 4×4 sub-blocks.Each sub-block corresponds to a coefficient sub-set. For each sub-block(i.e. each subset), the significance map, which is represented bysignificant_coeff_flag[x,y], is coded first. Variable x is thehorizontal position of the coefficient within the sub-block and thevalue of x is from 0 to (sub-block width−1). Variable y is the verticalposition of the coefficient within the sub-block and the value of y isfrom 0 to (sub-block height−1). The flag, significant_coeff_flag[x,y]indicates whether the corresponding coefficient of the TU is zero ornon-zero. For convenience, the index [x,y] is omitted fromsignificant_coeff_flag[x,y]. For each non-zero coefficient as indicatedby significant_coeff_flag, the level and sign of the non-zerocoefficient is represented by coeff_abs_level_greater1_flag,coeff_abs_level_greater2_flag, coeff_abs_level_minus3, andcoeff_sign_flag.

In HM-5.0, if the TU size is equal to 16×16, 32×32, 16×4, 4×16, 32×8, or8×32, one significant_coeffgroup_flag is coded for each sub-block priorto the coding of level and sign of the sub-block (e.g. thesignificant_coeff_flag, coeff_abs_level_greater1_flag,coeff_abs_level_greater2_flag, coeff_abs_level_minus3, andcoeff_sign_flag). If significant_coeffgroup_flag is equal to 0, itindicates that the entire 4×4 sub-block is zero. Therefore, there is noneed for any additional information to represent this sub-block.Accordingly, the coding of level and sign of sub-block can be skipped.If significant_coeffgroup_flag is equal to 1, it indicates that at leastone coefficient in the 4×4 sub-block is non-zero. The level and sign ofeach non-zero coefficient in the sub-block will be coded after thesignificant_coeffgroup_flag. The value of significant_coeff_flag isinferred as 1 for the sub-block containing the DC term (i.e., thetransform coefficient with the lowest spatial frequency).

In HM-5.0, significant_coeff_flag is coded in regular CABAC mode withcontext modeling. Different context selection methods are used fordifferent TU sizes. For TUs with size of 4×4 or 8×8, the contextselection is based on the position of the coefficient within the TU.FIG. 3 shows the position-based context selection map for a 4×4 TU andFIG. 4 shows the position-based context selection map for an 8×8 TU asadopted in HM-5.0. In FIG. 3, significance map 310 is used for the lumacomponent and significance map 320 is used for the chroma component,where each number corresponds to a context selection. In FIG. 4, lumaand chroma 8×8 TUs share the same significance map.

For other TU sizes, the neighboring-information-dependent contextselection is adopted. FIGS. 5A and 5B illustrate examples of theneighboring-information-dependent context selection for luma and chromacomponents respectively. One context is used for the DC coefficient. Fornon-DC coefficients (i.e., AC coefficients), the context selectiondepends on the neighboring coefficients. For example, a group ofneighboring non-zero coefficients including I, H, F, E, and B around acurrent coefficient X are used for the context selection. If none of theneighboring pixels is non-zero, context #0 is used for coefficient X. Ifone or two of the neighboring pixels are non-zero, context #1 is usedfor X. Otherwise context #2 is used for coefficient X.

In the above neighboring-information-dependent context selection, thenon-DC coefficients of the entire TU are divided into two regions (i.e.,region-1 and region-2) for the luma component and one region (region-2)for the chroma component. Different regions will use different contextsets. Each context set includes three contexts (i.e., context #0, #1,and #2). The area of region-1 for the luma component can bemathematically specified by the x-position and y-position of acoefficient X within the TU. As shown in FIG. 5A, if the sum ofx-position and y-position of coefficient X is smaller than a thresholdvalue and greater than 0, region-1 context set is selected forcoefficient X. Otherwise, region-2 context set is selected. Thethreshold value can be determined based on the width and the height ofthe TU. For example, the threshold can be set to a quarter of themaximum value of the TU width and the TU height. Accordingly, in thecase of TU sizes 32×32, 32×8 or 8×32, the threshold value can be set to8.

In HM-5.0, for TUs with sizes other than 4×4 and 8×8, the TUs will bedivided into 4×4 sub-blocks for coefficient map coding. However, thecriterion of region-1/region-2 context selection depends on thex-position and y-position of the transform coefficient. Therefore, somesub-blocks may cross the boundary between region-1 and region-2 and twocontext sets will be required for these sub-blocks. FIG. 6A illustratesan example where one 4×4 sub-block 610 (the center of the sub-block isindicated by a dot) for 16×16 TU 621, 16×4 622, and 4×16 TU 623 will usetwo context sets for significant_coeff_flag coding. FIG. 6B illustratesan example where three 4×4 sub-blocks 631 to 633 for 32×32 TU 641, 32×8TU 642, and 8×32 TU 643 will use two context sets forsignificant_coeff_flag coding. For sub-blocks 632 and 633, the sum ofx-potion and y-position of coefficient X has to be calculated in orderto determine whether the coefficient X is in region-1 or region-2. Forthe sub-block containing the DC term, i.e., sub-block 631, the positionof the DC term is known and all other coefficients in the sub-blockbelong to region-1. Therefore, significant_coeffgroup_flag can beinferred and there is no need to calculate the sum of x-position andy-position. For other sub-blocks, there is no need to calculate the sumof x-position and y-position of coefficient X since all coefficients ofother sub-blocks are in region-2 and one context set forsignificant_coeff_flag coding is used.

Therefore, it is desirable to simplify the context selection process,such as to eliminate the requirement of calculating the sum ofx-position and y-position of coefficient or to eliminate otheroperations.

BRIEF SUMMARY OF THE INVENTION

A method and apparatus for significance group flag coding are disclosed.According to one embodiment of the present invention, the TUs aredivided into one or more sub-blocks and the significance group flags arecoded based on context set selection. The context set selection isassociated with significance map coding of the sub-block, and thecontext set selection depends on horizontal sub-block index, verticalsub-block index, or both the horizontal sub-block index and the verticalsub-block index.

In an embodiment, two sub-blocks use same second context selection,second context set selection, or second context formation selection forsignificance group flag coding if these two sub-blocks use same contextselection, context set selection, or context formation selection for thesignificance map coding.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates exemplary architecture of CABAC encoding system witha bypass mode.

FIG. 2 illustrates an exemplary diagonal scanning order for thetransform coefficients of an 8×8 TU.

FIG. 3 illustrates an example of context selection maps for the 4×4 TUof luma and chroma components used by HEVC Test Model Version 5.0.

FIG. 4 illustrates an example of context selection map for the 8×8 TU ofluma and chroma components used by HEVC Test Model Version 5.0.

FIG. 5A illustrates an example of neighboring-information-dependentcontext selection for the 16×16 TU of luma component used by HEVC TestModel Version 5.0.

FIG. 5B illustrates an example of neighboring-information-dependentcontext selection for the 16×16 TU of chroma component used by HEVC TestModel Version 5.0.

FIG. 6A illustrates an example of context selection for the 16×16 TU ofluma component used by HEVC Test Model Version 5.0.

FIG. 6B illustrates an example of context selection for the 32×32 TU ofluma component used by HEVC Test Model Version 5.0.

FIG. 7A illustrates an example of block-based context selection for the16×16 TU of luma component according to an embodiment of the presentinvention.

FIG. 7B illustrates an example of block-based context selection for the32×32 TU of luma component according to an embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE INVENTION

In order to eliminate the need to calculate the sum of x-position andy-position of a coefficient, embodiments of the present invention useblock-based context selection to simplify and unify the context set,context selection and context formation for significant_coeff_flagcoding.

For TU sizes other than 4×4 and 8×8, the region-1/region-2 contextselection according to one embodiment of the present invention dependson the x-block-index and y-block-index of the sub-block instead of thex-position and y-position of the coefficient X. The x-block-index andy-block-index refer to the horizontal sub-block index and the verticalsub-block index respectively. The value of the x-block-index is from 0to (number of horizontal sub-blocks−1). The value of the y-block-indexis from 0 to (number of vertical sub-blocks−1). In a systemincorporating an embodiment of the present invention, none of thesub-blocks will cross the boundary between region-1 and region-2. Thereis no need to use two context sets for significant_coeff_flag coding orto calculate the sum of x-position and y-position for each coefficient.The region-1/region-2 determination can be based on the sum of thex-block-index and y-block-index of each sub-block. The sum can becompared with a threshold. The threshold value can either depend on theTU width and/or height or can be a fixed value.

FIG. 7 illustrates an example of block-based context selection accordingto an embodiment of the present invention. In this example, thethreshold value is set to the maximum value of TU width and TU heightdivided by 16. Therefore, the threshold value is 1 for 16×16 TU 721,16×4 TU 722, and 4×16 TU 723 and the threshold value is 2 for 32×32 TU741, 32×8 TU 742 and 8×32 TU 743. For the luma component, if the sum ofx-block-index and y-block-index of the sub-block is smaller than thethreshold value, region-1 context set is used for the sub-block.Otherwise region-2 context set is used for the sub-block. Accordingly,one sub-block 710 in FIG. 7A and three sub-blocks 731 through 733 inFIG. 7B use region-1 context and other sub-blocks use region-2 context.Furthermore, the value of significant_coeffgroup_flag can be inferred as1 for region-1 sub-blocks for unification.

While the 4×4 sub-block is used as an example of the block-based contextselection, other sub-block sizes may also be used. For example, insteadof the 4×4 sub-blocks, other sub-blocks such as 4×8, 8×4, 8×8, 16×16 and32×32 may also be used. While the above block-based significance mapcoding is used for context selection, the block-based significance mapcoding may also be used for context set selection or context formationselection. While the examples of block-based significance map codingshown above select context, context set or context formation based onsub-block index in scan order, horizontal sub-block index (i.e.,x-block-index) and/or vertical sub-block index (i.e., y-block-index),the selection may also be based on the video component type and/or theTU width/height. The video component type may correspond to the lumacomponent (Y) or the chroma component (Cr or Cb). The video componenttype may correspond to other video formats. Furthermore, the selectionmay depend on a combination of sub-block index in scan order, horizontalsub-block index, vertical sub-block index, video component type, and TUwidth/height.

The block-based significance group flag coding may be based on sub-blockindex in scan order, horizontal sub-block index (i.e., x-block-index)and/or vertical sub-block index (i.e., y-block-index). The block-basedsignificance group flag coding may also be based on the video componenttype and/or the TU width/height. Furthermore, the block-basedsignificance group flag coding may also be based on the context, contextset, or context formation selection associated with the significance mapcoding. The block-based significance group flag coding may also dependon a combination of sub-block index in scan order, horizontal sub-blockindex, vertical sub-block index, video component type, TU width/height,context, context set, and context formation selection associated withthe significance map coding.

The above description is presented to enable a person of ordinary skillin the art to practice the present invention as provided in the contextof a particular application and its requirement. Various modificationsto the described embodiments will be apparent to those with skill in theart, and the general principles defined herein may be applied to otherembodiments. Therefore, the present invention is not intended to belimited to the particular embodiments shown and described, but is to beaccorded the widest scope consistent with the principles and novelfeatures herein disclosed. In the above detailed description, variousspecific details are illustrated in order to provide a thoroughunderstanding of the present invention. Nevertheless, it will beunderstood by those skilled in the art that the present invention may bepracticed.

Embodiment of the present invention as described above may beimplemented in various hardware, software codes, or a combination ofboth. For example, an embodiment of the present invention can be acircuit integrated into a video compression chip or program codeintegrated into video compression software to perform the processingdescribed herein. An embodiment of the present invention may also beprogram code to be executed on a Digital Signal Processor (DSP) toperform the processing described herein. The invention may also involvea number of functions to be performed by a computer processor, a digitalsignal processor, a microprocessor, or field programmable gate array(FPGA). These processors can be configured to perform particular tasksaccording to the invention, by executing machine-readable software codeor firmware code that defines the particular methods embodied by theinvention. The software code or firmware code may be developed indifferent programming languages and different formats or styles. Thesoftware code may also be compiled for different target platforms.However, different code formats, styles and languages of software codesand other means of configuring code to perform the tasks in accordancewith the invention will not depart from the spirit and scope of theinvention.

The invention may be embodied in other specific forms without departingfrom its spirit or essential characteristics. The described examples areto be considered in all respects only as illustrative and notrestrictive. The scope of the invention is therefore, indicated by theappended claims rather than by the foregoing description. All changeswhich come within the meaning and range of equivalency of the claims areto be embraced within their scope.

1. A method of significance group flag coding, the method comprising:receiving one or more significance group flags associated with a TU(transform unit), wherein the TU is divided into one or more sub-blocks;and coding said one or more significance group flags based on contextset selection, wherein the context set selection is associated withsignificance map coding of the sub-block, and the context set selectiondepends on horizontal sub-block index, vertical sub-block index, or boththe horizontal sub-block index and the vertical sub-block index.
 2. Themethod of claim 1, wherein two sub-blocks use same second contextselection, second context set selection, or second context formationselection for significance group flag coding if said two sub-blocks usesame context selection, context set selection, or context formationselection for the significance map coding.
 3. The method of claim 2,wherein said same context, context set, or context formation for thesignificance map coding is determined by comparing the horizontalsub-block index, the vertical sub-block index, or a combination thereofwith a threshold.
 4. The method of claim 3, wherein the threshold isrelated to a TU width, a TU height or a combination thereof.
 5. Themethod of claim 4, wherein the threshold is derived based on maximum ofthe TU width and the TU height divided by
 16. 6. The method of claim 2,wherein a sum of the horizontal sub-block index and the verticalsub-block index of each sub-block is used to classify each sub-blockinto a class, wherein said same second context, second context set, orsecond context formation is determined according to the class.
 7. Themethod of claim 6, wherein the sum is compared with a threshold toclassify said each sub-block and the threshold is derived based onmaximum of a TU width and a TU height divided by
 16. 8. The method ofclaim 1, wherein the sub-block has a size corresponding to a 4×4, 4×8,8×4, 8×8, 16×16, or 32×32.
 9. An apparatus of significance group flagcoding, the apparatus comprising one or more electronics circuitsconfigured for: receiving one or more significance group flagsassociated with a TU (transform unit), wherein the TU is divided intoone or more sub-blocks; and coding said one or more significance groupflags based on context set selection, wherein the context set selectionis associated with significance map coding of the sub-block, and thecontext set selection depends on horizontal sub-block index, verticalsub-block index, or both the horizontal sub-block index and the verticalsub-block index.
 10. The apparatus of claim 9, wherein two sub-blocksuse same second context selection, second context set selection, orsecond context formation selection for significance group flag coding ifsaid two sub-blocks use same context selection, context set selection,or context formation selection for the significance map coding.
 11. Theapparatus of claim 10, wherein said same context, context set, orcontext formation for the significance map coding is determined bycomparing the horizontal sub-block index, the vertical sub-block index,or a combination thereof with a threshold.
 12. The apparatus of claim11, wherein the threshold is related to a TU width, a TU height or acombination thereof.
 13. The apparatus of claim 12, wherein thethreshold is derived based on maximum of the TU width and the TU heightdivided by
 16. 14. The apparatus of claim 10, wherein a sum of thehorizontal sub-block index and the vertical sub-block index of eachsub-block is used to classify each sub-block into a class, wherein saidsame second context, second context set, or second context formation isdetermined according to the class.
 15. The apparatus of claim 14,wherein the sum is compared with a threshold to classify said eachsub-block and the threshold is derived based on maximum of a TU widthand a TU height divided by
 16. 16. The apparatus of claim 9, wherein thesub-block has a size corresponding to a 4×4, 4×8, 8×4, 8×8, 16×16, or32×32.